package com.ujoku.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.labillusion.core.util.jsonFormat.SimpleDateSerializer;
import com.ujoku.payment.weChat.protocol.app_pay_protocol.AppPayProtocol;

import java.util.Date;

/**
 * Created by Greg.Chen on 14-12-3.
 */
public class OrderPayment {
    private String id;
    private String orderId;

    private Integer goodsId;
    private String goodsName;
    private Double amount;
    private String paymentType;
    private String paymentTypeDesc;
    private String message;
    private String description;
    private String mode;
    private int status;
    @JsonSerialize(using = SimpleDateSerializer.class)
    private Date addTime;

    private AppPayProtocol appPayProtocol;



    public String getPaymentTypeDesc() {
        switch (this.paymentType){
            case "Alipay":
                return "支付宝";
            case "UnionPay":
                return "网银支付";
        }
        return null;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public String getPaymentType() {
        return paymentType;
    }

    public void setPaymentType(String paymentType) {
        this.paymentType = paymentType;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public AppPayProtocol getAppPayProtocol() {
        return appPayProtocol;
    }

    public void setAppPayProtocol(AppPayProtocol appPayProtocol) {
        this.appPayProtocol = appPayProtocol;
    }
}
